﻿<%@ Page Language="c#" CodeBehind="ModifyInfo1.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.StaffPages.ModifyInfo1Page" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>ModifyInfo</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script language="javascript">
			//全选checkbox
			function SelectItem()
			{
				var i = 0;
				var e;

				for( i = 0 ; i < ListView.elements.length ; i ++ )
				{
					e = ListView.elements[ i ];
					if( e.type == "checkbox" )	e.checked = !e.checked;
				}
			}
			
			// 高亮背景
			function high( which )
			{ 
				which.style.background = "#C0D9E6";
				which.style.font.color = "red";
			} 

			// 取消背景高亮
			function low( which )
			{ 
				which.style.background = "#FFFFFF";
				which.style.font.color = "black";
			}
			
  </script>
</head>
<body text="#000000" leftmargin="2" topmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
  <form id="ListView" runat="server">
    <table id="AutoNumber1" style="border-collapse: collapse" bordercolor="#ccccc" height="13" cellspacing="0" cellpadding="0" width="100%" border="0">
      <tr>
        <td style="height: 185px" width="100%" colspan="8" height="185">
          <table id="AutoNumber2" style="border-collapse: collapse" bordercolor="#cccccc" height="55" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
              <td width="100%" colspan="8">
                <table id="AutoNumber4" style="border-collapse: collapse" bordercolor="#111111" height="1" cellspacing="0" cellpadding="0" width="100%" border="0">
                  <tr>
                    <td class="GbText" width="3%" bgcolor="#c0d9e6"><img height="16" src="../../Images/icon/07.gif" width="16"></td>
                    <td class="GbText" width="16%" bgcolor="#c0d9e6" height="1"><b><a title="刷新" href="javascript:location.reload()">人力资源列表</a> </b></td>
                    <td class="GbText" width="5%" bgcolor="#c0d9e6"><b><a title="返回主界面" href="../UnitiveDocument/index.aspx" target="main">返回</a></b></td>
                    <td width="21%" background="../../images/line1.gif" height="1">&nbsp; </td>
                    <td width="96%" height="1">
                      <table id="AutoNumber5" style="border-collapse: collapse" bordercolor="#111111" height="1" cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                          <td align="middle" width="8%" bgcolor='<% if(displaytype==false) Response.Write("#C0D9E6");%>'>
                            <p>
                              <a title="显示在职人员列表" href="ModifyInfo.aspx?displayType=0">在职人员</a>
                            </p>
                          </td>
                          <td align="middle" width="8%" bgcolor='<% if(displaytype) Response.Write("#C0D9E6");%>' height="1"><a title="显示离职人员列表" href="ModifyInfo.aspx?displayType=1">离职人员</a></td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr bgcolor="#c0d9e6">
              <td width="100%" colspan="8">
                <asp:DataGrid ID="StaffList" runat="server" PageSize="20" AutoGenerateColumns="False" Width="100%" AllowPaging="True" DataKeyField="Staff_ID">
                  <ItemStyle Font-Size="Smaller" ForeColor="Black"></ItemStyle>
                  <HeaderStyle Font-Size="Smaller" Font-Names="宋体" HorizontalAlign="Center" ForeColor="Blue" VerticalAlign="Bottom" BackColor="LightBlue"></HeaderStyle>
                  <Columns>
                    <asp:BoundColumn DataField="Staff_ID" ReadOnly="True" HeaderText="ID"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="用户名">
                      <ItemTemplate>
                        <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.staff_name") %>'>
                        </asp:Label>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn>
                      <ItemStyle Width="10%"></ItemStyle>
                      <HeaderTemplate>
                        真实姓名
                      </HeaderTemplate>
                      <ItemTemplate>
                        <%# ((DataRowView)Container.DataItem)["RealName"]%>
                      </ItemTemplate>
                      <EditItemTemplate>
                        <asp:TextBox ID="realname" TextMode="SingleLine" Text='<%# ((DataRowView)Container.DataItem)["RealName"]%>' Columns="10" runat="server">
                        </asp:TextBox>
                      </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn>
                      <ItemStyle Width="10%"></ItemStyle>
                      <HeaderTemplate>
                        手机
                      </HeaderTemplate>
                      <ItemTemplate>
                        <%# ((DataRowView)Container.DataItem)["Mobile"]%>
                      </ItemTemplate>
                      <EditItemTemplate>
                        <asp:TextBox ID="mobile" TextMode="SingleLine" Text='<%# ((DataRowView)Container.DataItem)["Mobile"]%>' Columns="15" runat="server">
                        </asp:TextBox>
                      </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="年龄">
                      <ItemTemplate>
                        <asp:Literal ID="old" runat="server" Text='<%# GetAge(((DataRowView)Container.DataItem)["Birthday"].ToString()) %>'>
                        </asp:Literal>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="性别">
                      <ItemStyle Width="5%"></ItemStyle>
                      <ItemTemplate>
                        <asp:Literal ID="sex" runat="server" Text='<%# GetSex(((DataRowView)Container.DataItem)["sex"].ToString(),((DataRowView)Container.DataItem)["Staff_ID"].ToString()) %>'>
                        </asp:Literal>
                      </ItemTemplate>
                      <EditItemTemplate>
                        <asp:DropDownList ID="gender" runat="server" SelectedIndex='<%# GetSexList(((DataRowView)Container.DataItem)["sex"].ToString(),((DataRowView)Container.DataItem)["Staff_ID"].ToString()) %>'>
                          <asp:ListItem Value="false">男</asp:ListItem>
                          <asp:ListItem Value="true">女</asp:ListItem>
                        </asp:DropDownList>
                      </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn>
                      <ItemStyle Width="10%"></ItemStyle>
                      <HeaderTemplate>
                        EMAIL
                      </HeaderTemplate>
                      <ItemTemplate>
                        <%#((DataRowView)Container.DataItem)["Email"]%>
                      </ItemTemplate>
                      <EditItemTemplate>
                        <asp:TextBox ID="email" Text='<%#((DataRowView)Container.DataItem)["Email"]%>' Columns="15" runat="server">
                        </asp:TextBox>
                      </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn>
                      <ItemStyle Width="10%"></ItemStyle>
                      <HeaderTemplate>
                        所在部门
                      </HeaderTemplate>
                      <ItemTemplate>
                        <%#((DataRowView)Container.DataItem)["Department_Name"]%>
                      </ItemTemplate>
                      <EditItemTemplate>
                        <asp:DropDownList ID="department" runat="server">
                        </asp:DropDownList>
                      </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn>
                      <ItemStyle Width="20%"></ItemStyle>
                      <HeaderTemplate>
                        注册日期
                      </HeaderTemplate>
                      <ItemTemplate>
                        <%#((DataRowView)Container.DataItem)["RegistedDate"]%>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="Department_ID" ReadOnly="True"></asp:BoundColumn>
                    <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="修改" CancelText="" EditText="选择"></asp:EditCommandColumn>
                  </Columns>
                  <PagerStyle Visible="False" Font-Size="Smaller" Font-Names="宋体" HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
                </asp:DataGrid>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr bgcolor="#c0d9e6">
        <td class="GbText" style="height: 31px" width="83%" bgcolor="#c0d9e6" height="31">&nbsp;<input class="ButtonCss" id="btn_Go" style="width: 36px; height: 20px" type="button" value="转到" name="btn_Go" runat="server"> 第<asp:TextBox ID="txb_PageNo" Width="20" runat="server" CssClass="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #fffffb 1px solid; BORDER-LEFT: #ffffff 1px solid; COLOR: #5e5e5e; BORDER-BOTTOM: #ffffff 1px solid; TEXT-ALIGN: center" TextMode="SingleLine"></asp:TextBox>
          页,每页显示<asp:TextBox ID="txb_ItemPerPage" onmouseover="high( this );" onmouseout="low( this );" Width="20" runat="server" CssClass="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #fffffb 1px solid; BORDER-LEFT: #ffffff 1px solid; COLOR: #5e5e5e; BORDER-BOTTOM: #ffffff 1px solid; TEXT-ALIGN: center" TextMode="SingleLine"></asp:TextBox>条记录,共有 <asp:Label ID="lbl_totalrecord" runat="server" Width="10px" Height="8px"></asp:Label>页记录.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
        <td style="height: 31px" width="3%" height="31"><asp:ImageButton ID="btn_first" runat="server" Width="23" Height="23" BorderWidth="0" ImageUrl="../../Images/top.gif" CommandArgument="first" ToolTip="第一页"></asp:ImageButton></td>
        <td style="height: 31px" width="3%" height="31"><asp:ImageButton ID="btn_pre" Width="23" runat="server" BorderWidth="0" ImageUrl="../../Images/prev.gif" CommandArgument="pre" ToolTip="前一页"></asp:ImageButton></td>
        <td class="GbText" style="height: 31px" align="middle" width="8%" height="31"><asp:Label ID="lbl_curpage" runat="server">Label</asp:Label>/ <asp:Label ID="lbl_totalpage" runat="server">Label</asp:Label></td>
        <td style="height: 31px" width="3%" height="31"><asp:ImageButton ID="btn_next" Width="23" runat="server" Height="23" BorderWidth="0" ImageUrl="../../Images/next.gif" CommandArgument="next" ToolTip="下一页"></asp:ImageButton></td>
        <td style="height: 31px" width="3%" height="31"><asp:ImageButton ID="btn_last" Width="23" runat="server" Height="23" BorderWidth="0" ImageUrl="../../Images/end.gif" CommandArgument="last" ToolTip="最后一页"></asp:ImageButton></td>
      </tr>
      <tr>
        <td width="100%" colspan="8">
          <table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
              <td></td>
              <td align="right"><img height="25" src="../../images/endbott.gif" width="279"></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
